Repository navigation
Conversation
alacritty-headless (windows-2025) 反复在「Build and test candidate shell on Windows」
失败。用 job API 取每步结论可定位到该步(无需日志),本地按同配置复现后原因明确:
'vim' is not recognized as an internal or external command
shell scenario timeout — Ran 6 tests in 33.099s
candidate-tui 场景会在真实 shell 里键入 vim 命令(shell.cpp:723),而
docs/research/joint-conpty-baseline.md:35 要求「需在 PATH 中显式提供固定 Vim」。
Git for Windows 的 vim.exe 位于 usr/bin,不在 hosted runner 默认 PATH,于是缺失
表现为 33 秒场景超时,而不是一条可读的失败原因。
两处修复:
- run.py: candidate-tui 启动前检查 shutil.which('vim'),缺失立即 RuntimeError;
按 more-capture-ech.md「skip 不代替运行证据」,这里是失败而非 skip
- core-candidate.yml: Windows 上把 Git 自带的 usr/bin 加入 GITHUB_PATH,
找不到则显式失败,保证该作业真的能跑 Vim 场景
#269 的 CI 结果是决定性的:该 PR 不含本步骤,两个 alacritty Windows 作业仍然 5m50s / 6m05s 通过。也就是说 hosted runner 上 Vim 本来就在 PATH,真正的失败 一直是 route_terminal_events 对 kind 8/9/10/11/13 抛异常,而不是缺 Vim。 本步骤因此没有依据,还引入一个新失败面(Git 安装位置变化时 exit 1)。 保留 run.py 的前置检查:它只在本地没有 Vim 时把 33 秒场景超时换成一条带文档 指引的即时失败,对 CI 无副作用。
Owner
Author
修正:本 PR 的前提判断是错的,workflow 部分已移除上一轮我把这个失败归因为「CI 缺 Vim」,并加了两处改动。#269 的 CI 结果否定了这个前提:
也就是说 hosted runner 上 Vim 本来就在 PATH,CI 真正的失败一直是 因此:
我的本地复现之所以指向 Vim,是因为这台机器确实没有 Vim;用它去推断 CI 环境是过度外推。教训记在这里,避免后来者沿用同一错误前提。 CI 失败的正确修复顺序:先 #269(事件分派),本 PR 只是本地诊断改善。 |
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题与最终行为
candidate-tui场景会在真实 shell 里键入 Vim 命令(experiments/shell/shell.cpp:723),而仓库文档要求 Vim 必须在 PATH 上(docs/research/joint-conpty-baseline.md:35)。当本机没有 Vim 时,这一步不是给出可读的失败,而是跑满 33 秒场景超时,唯一的痕迹是 shell 回显的'vim' is not recognized as an internal or external command。本 PR 在
experiments/shell/run.py的execute()入口加一次前置检查:candidate-tui启动前调用shutil.which("vim"),缺失立即抛RuntimeError并指向文档。按
docs/research/more-capture-ech.md「可选依赖缺失导致的 skip 不代替运行证据」,这里失败而不是 skip。修正说明
本 PR 最初还包含一个 workflow 步骤(把 Git 自带的
usr/bin加进GITHUB_PATH)。该步骤已移除:#269的 CI 结果显示,不含该步骤时两个 Windows alacritty 作业仍以 5m50s / 6m05s 通过——hosted runner 上 Vim 本来就在 PATH,CI 的真正失败是route_terminal_events对 kind 8/9/10/11/13 抛异常(由 #269 修复)。保留前置检查的原因与 CI 无关:它只改善本机没有 Vim 时的诊断。
验证
require_fixed_vim('candidate-tui')在 0.17 秒抛出带文档指引的RuntimeError;原先同一场景要跑满 33 秒超时candidate-tui模式不受影响性能影响(如适用)
不适用。新增一次 PATH 查找。
来源与限制
candidate-tui的断言,也不解决 CI 失败——后者由 #269 承担